<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:include page="Redir.jsp"></jsp:include>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link href="<c:url value='/css/default.css'/>" rel="stylesheet" type="text/css"/>
<head>
<fmt:setBundle basename="lang.message" />
<c:set var="t" value="true" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><fmt:message key="showpriority.title" /></title>
<script type="text/javascript" src="js/jquery-1.8.2.min.js" ></script>
<script type="text/javascript" src="js/NumericOnly.js" ></script>
<script src= "js/jquery.validate.min.js"></script>
<script type="text/javascript">
    $(function($,W,D)
            {
                var JQUERY = {};

                JQUERY.UTIL =
                {
                    setupFormValidation: function()
                    {
                                   
                        //form validation rules
                        $("#Priority").validate({
                            rules: {
                                
                                 code: "required",
                                 level : "required"
                                                           
                            },
                            messages: {
                                code: "Please enter Code",
                                level: "Please enter Level"
                               },
                            submitHandler: function(form) {
                                form.submit();
                            }
                        });
                    }
                }

                //when the dom has loaded setup form validation rules document.createElement('script');
                //window.jQuery.fn.jquery------ $("#id").functionname(function(){........});
                $(D).ready(function($) {
                    JQUERY.UTIL.setupFormValidation();
                });

            })(jQuery, window, document);
    </script>
</head>
<body>
<%@include file="Header.jsp" %>
<div id="wrapper">	
    <div id="page-wrapper">
		<div id="page">
				<%@include file="Menu.jsp" %>   
			<div id="content">
			
	<form action="ProcessPriority" method=post id="Priority">
			<h2><fmt:message key="showpriority.add"/></h2>
				
			<table class="table-form">
				<tr>
					<td width="130px"><fmt:message key="label.priority.code" /></td>
					<td><input type="text" name="code" value="${data.code}"
						size="15" maxlength="20" class="numeric_field"
						${action == 'edit' ? 'readonly="readonly"' : '' } /> <input
						type="hidden" name="action" value="${action}" /></td>
				</tr>
				<tr>
					<td><fmt:message key="label.priority.level" /></td>
					<td><input type="text" name="level" value="${data.level}"
						size=15 maxlength=20></td>
				</tr>
				<c:if test="${not empty error}">
				<tr>
					<td colspan="2" style="color: red;">
						<fmt:message key="${error}" />
					</td>
				</tr>
				</c:if>
			</table>
	
		<input type="submit" value="Submit" class="button-style">
		 <input type="reset" value="Reset" name="reset" class="button-style-cancel">
			

	</form>
	</div>
	</div>
</div>
</div>
<%@include file="Footer.jsp" %>
</body>
</html>